package com.witdata.controller.system;

import com.witdata.common.domain.Result;
import com.witdata.common.service.SystemService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/system/update")
@RequiredArgsConstructor
public class UpdateController {
    private final SystemService systemService;

    @GetMapping("/check")
    public Result<String> check(@RequestParam("version") String version) {
        systemService.check(version);
        return Result.ok();
    }

}
